package com.yinp.proapp.web.erp_retrofit;

import org.jetbrains.annotations.NotNull;

/**
 * @author :yinpeng
 * date      :2021/8/20
 * package   :com.yinp.proapp.web.retrofit
 * describe  :
 */
public class PictureData<T> {
    private boolean success;             //请求是否成功
    private String message;             //提示信息
    private int code;                   //响应码
    private T result;                  //返回的具体数据
    private long timestamp;

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public PictureData() {
    }
    //    public final static int ERROR_CODE_400=400;//失败的code

//    public boolean isSuccess() {
//        return getStatus() == SUCCESS_CODE;
//    }


    @NotNull
    @Override
    public String toString() {
        return "BaseReponse{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", results=" + result +
                '}';
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
}
